<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Spring Boot测试</title>
    <!-- 包含头部信息用于适应不同设备 -->
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!-- 包含 bootstrap 样式表 -->
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}" />
    <script th:src="@{/3party/jquery-2.1.1.min.js}"></script>
    <script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
</head>

<body style="margin: 20px">

    <div>
        <h3 th:text="'您好，'+ ${username}"></h3>
        <a th:href="@{/user/logout}">退出</a>
    </div>


    <a class="btn left" th:width="300px" th:height="40px" th:href="@{/food/addFood}">新增</a>


    <div >

        <table name="foodList" class="table" width="100%" border="1" th:margin="20px">
            <tr>
                <!--<th data-field="checkbox" width="100px">勾选</th>-->
                <th data-field="foodname" width="100px">名称</th>
                <th data-field="foodcover" width="120px">缩略图</th>
                <th data-field="foodprice" >价格</th>
                <th data-field="fooddiscount">折扣</th>
                <th data-field="foodclass" >分类</th>
                <th data-field="oprator" >操作</th>
            </tr>

            <tr th:each="food:${foods}">
                <!--<td ><input type="checkbox"/></td>-->
                <td th:text="${food.foodname}"></td>
                <td th:text="${food.foodcover}"></td>
                <th th:text="${food.foodprice}"></th>
                <th th:text="${food.fooddiscount}"></th>
                <th th:text="${food.foodclass}">状态变量：size</th>
                <td >
                    <a  th:text="修改" th:href="@{'/food/update/'+ ${food.id}}"/>
                    <a  th:text="删除" th:href="@{'/food/delete/'+ ${food.id}}"/>
                </td>
            </tr>

        </table>

    </div>

</body>
</html>